<%@page import="java.math.BigDecimal"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@page import="THB.*"%>


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP HIBERNATE ORACLE - Ronaldo Tinoco</title>
        <style>
            table
            { width: 580px;
              background-color: #fafafa;
              border: 1px #000000 solid;
              border-collapse: collapse;
              border-spacing: 0px; }


            th
            { background-color: #99CCCC;
              border: 1px #000000 solid;
              font-family: Verdana;
              font-weight: bold;
              font-size: 12px;
              color: #404040; }


            td
            { border-bottom: 1px #6699CC dotted;
              text-align: left;
              font-family: Verdana, sans-serif, Arial;
              font-weight: normal;
              font-size: .7em;
              color: #404040;
              background-color: #fafafa;
              padding-top: 4px;
              padding-bottom: 4px;
              padding-left: 8px;
              padding-right: 0px; }
            </style>
        </head>
        <body>
            <center>
                <img src="oracle.gif" width="144" height="18" alt="" />
                <h2>HIBERNATE</h2>
                <h3>JSP</h3>
                <h5>Development - Ronaldo Tinoco</h5>
                <form action="GuardarDatos" method="post">
                    <table>
                        <tr>
                            <th>Codigo</th>
                            <td><input type="text" name="CODEkos" id="CODEkos" /></td>
                    </tr>
                    <tr>
                        <th>Descripcion One</th>
                        <td><input type="text" name="Descripcion1" id="Descripcion1" /></td>
                    </tr>
                    <tr>
                        <th>Descripcion Two</th>
                        <td><input type="text" name="Descripcion2" id="Descripcion2" /></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input type="submit" value="Ingresar" /></td>
                    </tr>
                </table>
            </form>
            <br
                <h1>Datos Almacenados en la base de datos ORACLE</h1>
            //delete Testone;
            <!--<h3><a href="GuardarDatos?EliminarTable=true">Vaciar la tabla de datos</a></h3>-->
            <table border="1">
                <tr>
                    <th>Codigo</th>
                    <th>Descripcion One</th>
                    <th>Descripcion Two</th>
                    <th>Eliminar Dato de Oracle</th>
                </tr>

                <%
                            TestHB THBB = new TestHB();
                            List TB = THBB.getListT1();
                            Iterator it = TB.iterator();
                            while (it.hasNext()) {
                                Testone TO = (Testone) it.next();
                                out.println("<tr>");
                                out.println("<td>" + TO.getIdTt() + "</td>");
                                out.println("<td>" + TO.getDescripcion1() + "</td>");
                                out.println("<td>" + TO.getDescripcion2() + "</td>");
                                out.println("<td><a href=\"GuardarDatos?Eliminar=" + TO.getIdTt() + "\">Eliminar Informacion</a></td>");
                                out.println("</tr>");
                            }
                %>
            </table>
        </center>
    </body>
</html>
